Skip to content

Conversation

MaxwellOldshein
Copy link
Contributor

@MaxwellOldshein MaxwellOldshein commented Oct 6, 2025

This PR updates the validate_modified_targets.yml GitHub Actions workflow to validate the PR head data.json file against the base data schema before running any further validation test suites, resulting in a fail if it is non-compliant due to any of the jsonschema exceptions that validation might raise.

Closes #2612.

@MaxwellOldshein MaxwellOldshein changed the title feat: GitHub Actions - Validate Remote Manifest Against Local Schema Before Running validate_targets Test Suite feat: GitHub Actions - Validate Remote Manifest Against Local Schema Before Running Validate Modified Targets Test Suite Oct 6, 2025
@MaxwellOldshein MaxwellOldshein marked this pull request as ready for review October 6, 2025 17:27
@ppfeister
Copy link
Member

ppfeister commented Oct 7, 2025

So, there might be an easier way

Validation is already written in as a unit test. Rather than re-engineering things and adding additional maintenance overhead, we could leverage that. And any additional validation steps added to this test will then be carried over automatically.

Was going to commit this earlier, but I'll let you retain credit for the event if you wanna open a clean PR / overwrite in place with --force-with-lease (or, raise any thoughts or concerns here)

The Prepare JSON versions for comparison job already replaces the base manifest with that from the head. So an additional job can be created immediately after called Validate against schema or similar, that runs this test by

poetry run pytest tests/test_manifest.py::test_validate_manifest_against_local_schema

Similar to how it's called later in Validate modified targets (just without continue-on-error or the if). So, like 2 lines plus whitespace.

If this test fails, the workflow will stop, yielding an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate manifest schema before running validate_targets test suite
2 participants